Skip to content

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Oct 5, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Zalathar and others added 11 commits October 4, 2025 18:16
Using a helper trait allows the conversions to remain in `rustc_codegen_llvm`,
even if the FFI types are moved to a different crate.
This patch also moves `Regions` to a different module, since that type can stay
put when the FFI bindings move to another crate.
ensure_version_or_cargo_install uses -Copt-level=0 for quicker installation.
However, the flag affects the tool's performance. For example, typos-cli with opt-level=0 takes 15 seconds for checking ./compiler, but the tool with default opt-level only takes less than 1 sec.
This commit enables the option only when the test tidy is run on CI.
cg_llvm: Remove inherent methods from several LLVM FFI types

This is mainly motivated by rust-lang#142897, which proposes to move the LLVM FFI bindings out of `rustc_codegen_llvm` and into `rustc_llvm`, which is arguably the more correct place for them from a linking perspective.

---

In order to perform that migration, all of the types used in FFI signatures also need to be moved. However, several of those types have inherent methods that convert from backend-independent types to LLVM FFI types.

Moving the inherent methods as-is would require adding a lot of otherwise-unnecessary dependencies to `rustc_llvm`. And we can't leave them behind as-is, because inherent methods can't be defined in another crate.

Therefore, this PR replaces several of those inherent methods with either extension trait methods or free functions.
Set opt-level flag for installing tool only on CI

## Context
ensure_version_or_cargo_install uses -Copt-level=0 for quicker installation. However, the flag affects the tool's performance. For example, typos-cli with opt-level=0 takes 15 seconds for checking /compiler on my local, but the tool with default opt-level only takes less than 1 sec.

It fixes rust-lang#147331

## Changes
This PR enables the option only when the test tidy is run on CI.
We've discussed that opt-level=1 should be enough, so I also change the level from 0 to 1.
… r=Kobzol

bootstrap: don't build book redirect pages during dry-run/test

Currently, `./x test bootstrap` does not automatically transitively checkout submodules needed to pass all involved test steps. Apparently one place where bootstrap's self-test can choke on locally is trying to build book redirect pages without the book submodules checked out.

This change is orthogonal to making bootstrap checking out required submodules for self-tests, and IMO is beneficial regardless since IMO we should not be building these redirect pages during test/dry-run _anyway_.

This was blocking me trying to rebless bootstrap self-tests for rust-lang#147372. cf. [#t-infra/bootstrap > Bootstrap self-tests @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Bootstrap.20self-tests/near/543157194).

r? `@Kobzol` (or bootstrap)
…f-test, r=Kobzol

bootstrap: relax `compiler-rt` root assertion

Not needed during tests. This would otherwise require `src/llvm-project` submodule to be initialized and `compiler-rt/` subdirectory to be present.

I need this and rust-lang#147374 to get bootstrap self-tests to pass with no git submodules checked out locally.

r? `@Kobzol` (or bootstrap)
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Oct 5, 2025
@workingjubilee
Copy link
Member Author

@bors rollup=never p=5 r+

@bors
Copy link
Collaborator

bors commented Oct 5, 2025

📌 Commit 0d3e4d1 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2025
@bors
Copy link
Collaborator

bors commented Oct 5, 2025

⌛ Testing commit 0d3e4d1 with merge 8392220...

@workingjubilee
Copy link
Member Author

absolutely tiny rollup, I know, but I figured it would leave us with a literally empty queue except for PRs that just entered

@bors
Copy link
Collaborator

bors commented Oct 5, 2025

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 8392220 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 5, 2025
@bors bors merged commit 8392220 into rust-lang:master Oct 5, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 5, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#147327 cg_llvm: Remove inherent methods from several LLVM FFI types 800d6a38dc9b3a06e89d0840b68ceaacfb13e0d3 (link)
#147332 Set opt-level flag for installing tool only on CI 4caeb4f0cb8ebc3384d9f600559de2a005174955 (link)
#147374 bootstrap: don't build book redirect pages during dry-run/t… a1d92bfca96ef06c8421c311310585ae56de5269 (link)
#147376 bootstrap: relax compiler-rt root assertion ae96504f8a1d486c45baf52eff6511cef6bc7eff (link)

previous master: 981353ca16

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link
Contributor

github-actions bot commented Oct 5, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 981353c (parent) -> 8392220 (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 839222065a44ac21c15df68ed2f2f3c0127b0b8e --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-apple: 7986.1s -> 6245.9s (-21.8%)
  2. x86_64-gnu-llvm-20: 2785.8s -> 2360.2s (-15.3%)
  3. x86_64-rust-for-linux: 2995.6s -> 2581.7s (-13.8%)
  4. aarch64-gnu-llvm-20-1: 3815.4s -> 3349.0s (-12.2%)
  5. pr-check-2: 2586.1s -> 2293.6s (-11.3%)
  6. i686-gnu-2: 6136.4s -> 5485.1s (-10.6%)
  7. aarch64-gnu-debug: 4192.2s -> 3778.2s (-9.9%)
  8. x86_64-msvc-ext2: 5364.9s -> 5865.8s (9.3%)
  9. x86_64-gnu-miri: 4362.2s -> 3965.6s (-9.1%)
  10. aarch64-gnu-llvm-20-2: 2443.8s -> 2223.6s (-9.0%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8392220): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) - - 0

Cycles

Results (primary 2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 471.402s -> 471.555s (0.03%)
Artifact size: 388.23 MiB -> 388.38 MiB (0.04%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants